package com.xzr.demo.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author：徐志荣
 * @Date：2023/6/17 上午 10:19
 */

@RestController

public class CalcController {
    @RequestMapping("/calc")
    public  String calc(Integer num1,Integer num2){
        if(num1 == null ||num2 == null) return "参数错误!";
        return num1 + " + "+ num2+ " = "+(num1+num2);

    }
}

